Mysql connections not released

Mysql connections not released

am 02.07.2010 08:58:45 von machielr

------=_NextPart_000_0083_01CB19C4.CBC179D0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0084_01CB19C4.CBC179D0"


------=_NextPart_001_0084_01CB19C4.CBC179D0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Good morning all



A few days ago i posted some questions relating to mysql
threads running out and not being able to restart the database.



We had the same again this morning however this time I had a
bit of a heads up and managed to get into the database before it went down
(so to speak).





What I found was the following:



.. When running ' show processlist', the amount of processes were
increasing the whole time.

.. From the details, it seemed that all the connections were coming
from the website and were trying to make connections to the database,
however the statuses never changed from connect to anything else, and yet
the amount of connections kept on rising.

.. From what I could gather, the incoming processes were trying to
connect to the database but the connections could not be released causing
havoc.



I have tried to find clues in log files, etc... but nothing turned up. I
suspected that it could perhaps be php however this could not be verified
yet.



Can someone please provide me with some thoughts as to why this could be
happening? I am fairly new to MySQL and not sure where else to go from here
to find the root cause.



Generally everything works fine, however , every now and then things
suddenly seem to be going wrong... L



Any help would be appreciated.



Machiel Richards

MySQL DBA

Relational Database Consulting



RDC_Logo




------=_NextPart_001_0084_01CB19C4.CBC179D0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">










Good morning all



 



class=3DMsoNormal>         &=
nbsp;      A few days ago i posted some =
questions
relating to mysql threads running out and not being able to restart the
database.



 



class=3DMsoNormal>         &=
nbsp;      We had the same again this morning =
however
this time I had a bit of a heads up and managed to get into the database =
before
it went down (so to speak).



 



 



class=3DMsoNormal>         &=
nbsp;      What I found was the =
following:



 



style=3D'margin-left:72.0pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'> style=3D'font-family:Symbol'> style=3D'mso-list:Ignore'>· Roman"'>        
When running =
‘ show
processlist’, the amount of processes were increasing the whole =
time.



style=3D'margin-left:72.0pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'> style=3D'font-family:Symbol'> style=3D'mso-list:Ignore'>· Roman"'>        
From the details, =
it seemed
that all the connections were coming from the website and were trying to =
make
connections to the database, however the statuses never changed from =
connect to
anything else, and yet the amount of connections kept on =
rising.



style=3D'margin-left:72.0pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'> style=3D'font-family:Symbol'> style=3D'mso-list:Ignore'>· Roman"'>        
From what I could =
gather,
the incoming processes were trying to connect to the database but the =
connections
could not be released causing havoc.



 



I have tried to find =
clues in log
files, etc... but nothing turned up. I suspected that it could perhaps =
be php
however this could not be verified yet.



 



Can someone please =
provide me
with some thoughts as to why this could be happening? I am fairly new to =
MySQL
and not sure where else to go from here to find the root =
cause.



 



Generally everything =
works fine,
however , every now and then things suddenly seem to be going wrong... =
style=3D'font-family:Wingdings'>L



 



  Any help would =
be appreciated.



 



Machiel =
Richards



MySQL =
DBA



MS"'>Relational
Database Consulting



 



id=3D"Picture_x0020_1"
src=3D"cid:image001.jpg@01CB19C4.C579A840" =
alt=3D"RDC_Logo">



 









------=_NextPart_001_0084_01CB19C4.CBC179D0--

------=_NextPart_000_0083_01CB19C4.CBC179D0--

Re: Mysql connections not released

am 02.07.2010 09:42:13 von Rob Wultsch

--0016364edd6adef67e048a62ba66
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards wrote=
:

> Good morning all
>
>
>
> A few days ago i posted some questions relating to mysql
> threads running out and not being able to restart the database.
>
>
>
> We had the same again this morning however this time I ha=
d
> a bit of a heads up and managed to get into the database before it went d=
own
> (so to speak).
>
>
>
>
>
> What I found was the following:
>
>
>
> =B7 When running =91 show processlist=92, the amount of processes=
were
> increasing the whole time.
>
> =B7 From the details, it seemed that all the connections were com=
ing
> from the website and were trying to make connections to the database,
> however the statuses never changed from connect to anything else, and yet
> the amount of connections kept on rising.
>
> =B7 From what I could gather, the incoming processes were trying =
to
> connect to the database but the connections could not be released causing
> havoc.
>
>
>
> I have tried to find clues in log files, etc... but nothing turned up. I
> suspected that it could perhaps be php however this could not be verified
> yet.
>
>
>
> Can someone please provide me with some thoughts as to why this could be
> happening? I am fairly new to MySQL and not sure where else to go from he=
re
> to find the root cause.
>
>
>
> Generally everything works fine, however , every now and then things
> suddenly seem to be going wrong... L
>
>
>
> Any help would be appreciated.
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> [image: RDC_Logo]
>
>
>
My first guess would be a networking problem. If you run ifconfig repeatedl=
y
do you notice the number of errors increasing? It would be good to look at
both the database server and the web server. Also, until you figure the
issue out you should be able to mitigate it by setting the connect timeout
to a more aggressive value.


--=20
Rob Wultsch
wultsch@gmail.com

--0016364edd6adef67e048a62ba66--

RE: Mysql connections not released

am 02.07.2010 10:05:26 von machielr

------=_NextPart_000_00D5_01CB19CE.1BA581E0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_00D6_01CB19CE.1BA581E0"


------=_NextPart_001_00D6_01CB19CE.1BA581E0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi



From a thread found on the net it also suggests that it might be network
or DNS related.



The connections building up is the following:



*************************** 1346. row
***************************

Id: 903175

User: unauthenticated user

Host: :51798

db: NULL

Command: Connect

Time: NULL

State: login

Info: NULL





The servers however only uses ip connections and no DNS
related lookups.



From what I could find on the web though it seems that there
is one session that is unable to authenticate and the authentication process
does not complete causing it to get "stuck"

This then causes all other requests to wait for the
transaction to complete.



Everyone who replied to these threads with the same issue
stated that when they kill that one problem connection it brings everything
back to normal again, however the problem happens regularly and if not
picked up immediately eventually causes an inability to access the database
to even kill processes, etc...





So what I know now is that the problem is caused by a
connection / transaction not completing. However what I need to find out now
is why and how to resolve this.







Machiel Richards

MySQL DBA

Relational Database Consulting



RDC_Logo



From: Rob Wultsch [mailto:wultsch@gmail.com]
Sent: 02 July 2010 9:42 AM
To: Machiel Richards
Cc: mysql@lists.mysql.com
Subject: Re: Mysql connections not released



On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards
wrote:

Good morning all



A few days ago i posted some questions relating to mysql
threads running out and not being able to restart the database.



We had the same again this morning however this time I had a
bit of a heads up and managed to get into the database before it went down
(so to speak).





What I found was the following:



.. When running ' show processlist', the amount of processes were
increasing the whole time.

.. From the details, it seemed that all the connections were coming
from the website and were trying to make connections to the database,
however the statuses never changed from connect to anything else, and yet
the amount of connections kept on rising.

.. From what I could gather, the incoming processes were trying to
connect to the database but the connections could not be released causing
havoc.



I have tried to find clues in log files, etc... but nothing turned up. I
suspected that it could perhaps be php however this could not be verified
yet.



Can someone please provide me with some thoughts as to why this could be
happening? I am fairly new to MySQL and not sure where else to go from here
to find the root cause.



Generally everything works fine, however , every now and then things
suddenly seem to be going wrong... L



Any help would be appreciated.



Machiel Richards

MySQL DBA

Relational Database Consulting



Error! Filename not specified.



My first guess would be a networking problem. If you run ifconfig repeatedly
do you notice the number of errors increasing? It would be good to look at
both the database server and the web server. Also, until you figure the
issue out you should be able to mitigate it by setting the connect timeout
to a more aggressive value.


--
Rob Wultsch
wultsch@gmail.com


------=_NextPart_001_00D6_01CB19CE.1BA581E0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">










style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Hi



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>   From a thread found on the net it also =
suggests
that it might be network or DNS related.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      The
connections building up is the following:



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;     
***************************
1346. row ***************************



     Id: 903175



   User: unauthenticated =
user



   Host: <ip>:51798



     db: NULL



Command: Connect



   Time: NULL



  State: login



   Info: NULL



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      The
servers however only uses ip connections and no DNS related =
lookups.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      From
what I could find on the web though it seems that there is one session =
that is
unable to authenticate and the authentication process does not complete =
causing
it to get “stuck”



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      This
then causes all other requests to wait for the transaction to =
complete.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      Everyone
who replied to these threads with the same issue stated that when they =
kill
that one problem connection it brings everything back to normal again, =
however
the problem happens regularly and if not picked up immediately =
eventually
causes an inability to access the database to even kill processes, =
etc...



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;     



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>         &nbs=
p;      So
what I know now is that the problem is caused by a connection / =
transaction not
completing. However what I need to find out now is why and how to =
resolve this.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



Sans MS";
color:#1F497D'>Machiel Richards



Sans MS";
color:#1F497D'>MySQL DBA



Sans MS";
color:#1F497D'>Relational Database Consulting



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> src=3D"cid:image001.jpg@01CB19CC.0C64B360" =
alt=3D"RDC_Logo">



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



0cm 0cm 0cm'>

style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:
style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Rob Wultsch =
[mailto:wultsch@gmail.com]

Sent: 02 July 2010 9:42 AM

To: Machiel Richards

Cc: mysql@lists.mysql.com

Subject: Re: Mysql connections not released





 





On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards =
< href=3D"mailto:machielr@rdc.co.za">machielr@rdc.co.za> =
wrote:







style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >Good
morning all



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
A few days ago i posted some questions relating to mysql threads running =
out
and not being able to restart the database.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
We had the same again this morning however this time I had a bit of a =
heads up
and managed to get into the database before it went down (so to =
speak).



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
What I found was the following:



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; When
running ‘ show processlist’, the amount of processes were
increasing the whole time.



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; From
the details, it seemed that all the connections were coming from the =
website
and were trying to make connections to the database, however the =
statuses never
changed from connect to anything else, and yet the amount of connections =
kept
on rising.



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; From
what I could gather, the incoming processes were trying to connect to =
the
database but the connections could not be released causing =
havoc.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>I have tried to find clues in log files, etc... but =
nothing
turned up. I suspected that it could perhaps be php however this could =
not be
verified yet.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>Can someone please provide me with some thoughts as =
to why
this could be happening? I am fairly new to MySQL and not sure where =
else to go
from here to find the root cause.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>Generally everything works fine, however , every now =
and
then things suddenly seem to be going wrong... style=3D'font-family:Wingdings'>L



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>  Any help would be appreciated.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>Machiel =
Richards



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>MySQL DBA



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>Relational Database Consulting =



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > lang=3DEN-US>Error! Filename not specified.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>









My first guess would be a networking problem. If =
you run
ifconfig repeatedly do you notice the number of errors increasing? It =
would be
good to look at both the database server and the web server. Also, until =
you
figure the issue out you should be able to mitigate it by setting the =
connect
timeout to a more aggressive value.





--

Rob Wultsch

href=3D"mailto:wultsch@gmail.com">wultsch@gmail.com









------=_NextPart_001_00D6_01CB19CE.1BA581E0--

------=_NextPart_000_00D5_01CB19CE.1BA581E0--

Re: Mysql connections not released

am 02.07.2010 10:45:43 von Rob Wultsch

--00c09fa21cb40bbd6a048a639eae
Content-Type: multipart/alternative; boundary=00c09fa21cb40bbd64048a639ead

--00c09fa21cb40bbd64048a639ead
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

A bad assumption I make these days is that everyone has skip resolve off. I=
f
that is the case DNS issues will not impact you.

Do you have that setting?
Do you see errors on the interface?

On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards wrote=
:

> Hi
>
>
>
> From a thread found on the net it also suggests that it might be netwo=
rk
> or DNS related.
>
>
>
> The connections building up is the following:
>
>
>
> *************************** 1346. row
> ***************************
>
> Id: 903175
>
> User: unauthenticated user
>
> Host: :51798
>
> db: NULL
>
> Command: Connect
>
> Time: NULL
>
> State: login
>
> Info: NULL
>
>
>
>
>
> The servers however only uses ip connections and no DNS
> related lookups.
>
>
>
> From what I could find on the web though it seems that
> there is one session that is unable to authenticate and the authenticatio=
n
> process does not complete causing it to get =93stuck=94
>
> This then causes all other requests to wait for the
> transaction to complete.
>
>
>
> Everyone who replied to these threads with the same issue
> stated that when they kill that one problem connection it brings everythi=
ng
> back to normal again, however the problem happens regularly and if not
> picked up immediately eventually causes an inability to access the databa=
se
> to even kill processes, etc...
>
>
>
>
>
> So what I know now is that the problem is caused by a
> connection / transaction not completing. However what I need to find out =
now
> is why and how to resolve this.
>
>
>
>
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> [image: RDC_Logo]
>
>
>
> *From:* Rob Wultsch [mailto:wultsch@gmail.com]
> *Sent:* 02 July 2010 9:42 AM
> *To:* Machiel Richards
> *Cc:* mysql@lists.mysql.com
> *Subject:* Re: Mysql connections not released
>
>
>
> On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards
> wrote:
>
> Good morning all
>
>
>
> A few days ago i posted some questions relating to mysql
> threads running out and not being able to restart the database.
>
>
>
> We had the same again this morning however this time I ha=
d
> a bit of a heads up and managed to get into the database before it went d=
own
> (so to speak).
>
>
>
>
>
> What I found was the following:
>
>
>
> =B7 When running =91 show processlist=92, the amount of processes=
were
> increasing the whole time.
>
> =B7 From the details, it seemed that all the connections were com=
ing
> from the website and were trying to make connections to the database,
> however the statuses never changed from connect to anything else, and yet
> the amount of connections kept on rising.
>
> =B7 From what I could gather, the incoming processes were trying =
to
> connect to the database but the connections could not be released causing
> havoc.
>
>
>
> I have tried to find clues in log files, etc... but nothing turned up. I
> suspected that it could perhaps be php however this could not be verified
> yet.
>
>
>
> Can someone please provide me with some thoughts as to why this could be
> happening? I am fairly new to MySQL and not sure where else to go from he=
re
> to find the root cause.
>
>
>
> Generally everything works fine, however , every now and then things
> suddenly seem to be going wrong... L
>
>
>
> Any help would be appreciated.
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> *Error! Filename not specified.*
>
>
>
> My first guess would be a networking problem. If you run ifconfig
> repeatedly do you notice the number of errors increasing? It would be goo=
d
> to look at both the database server and the web server. Also, until you
> figure the issue out you should be able to mitigate it by setting the
> connect timeout to a more aggressive value.
>
>
> --
> Rob Wultsch
> wultsch@gmail.com
>



--=20
Rob Wultsch
wultsch@gmail.com

--00c09fa21cb40bbd64048a639ead
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

A bad assumption I make these days is that everyone has skip resolve off. I=
f that is the case DNS issues will not impact you.

Do you have that =
setting?
Do you see errors on the interface?

quote">

On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards < ref=3D"mailto:machielr@rdc.co.za">machielr@rdc.co.za> wrote:<=
br>
rder-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">















25);">Hi



25);">=A0



25);">   From a thread found on the net it also suggests
that it might be network or DNS related.



25);">=A0



25);">              =A0 The
connections building up is the following:



25);">=A0



25);">              =A0 ****************=
***********
1346. row ***************************



     Id: 903175



   User: unauthenticated user



   Host: <ip>:51798



     db: NULL



Command: Connect



   Time: NULL



=A0 State: login



   Info: NULL



25);">=A0



25);">=A0



25);">              =A0 The
servers however only uses ip connections and no DNS related lookups.
=



25);">=A0



25);">              =A0 From
what I could find on the web though it seems that there is one session that=
is
unable to authenticate and the authentication process does not complete cau=
sing
it to get =93stuck=94



25);">              =A0 This
then causes all other requests to wait for the transaction to complete. an>



25);">=A0



25);">              =A0 Everyone
who replied to these threads with the same issue stated that when they kill
that one problem connection it brings everything back to normal again, howe=
ver
the problem happens regularly and if not picked up immediately eventually
causes an inability to access the database to even kill processes, etc... span>



25);">=A0



25);">              =A0



25);">              =A0 So
what I know now is that the problem is caused by a connection / transaction=
not
completing. However what I need to find out now is why and how to resolve t=
his.



25);">=A0



25);">=A0



25);">=A0



omic Sans MS"; color: rgb(31, 73, 125);">Machiel Richards



omic Sans MS"; color: rgb(31, 73, 125);">MySQL DBA



omic Sans MS"; color: rgb(31, 73, 125);">Relational Database Consultin=
g



25);">=A0



25);">3D"RDC_Logo" h=3D"323" height=3D"117">



25);">=A0



ne none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text=
-color; padding: 3pt 0cm 0cm;">

F=
rom:
Rob Wultsch=
[mailto:wultsch@gma=
il.com
]



Sent: 02 July 2010 9:42 AM

To: Machiel Richards

Cc: mysql=
@lists.mysql.com


Subject: Re: Mysql connections not released





=A0





On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards &l=
t;machielr@rdc.co.z=
a
> wrote:







Good
morning all



=A0



              =A0
A few days ago i posted some questions relating to mysql threads running ou=
t
and not being able to restart the database.



=A0



              =A0
We had the same again this morning however this time I had a bit of a heads=
up
and managed to get into the database before it went down (so to speak).



=A0



=A0



              =A0
What I found was the following:



=A0



=B7 pan>         When
running =91 show processlist=92, the amount of processes were
increasing the whole time.



=B7 pan>         From
the details, it seemed that all the connections were coming from the websit=
e
and were trying to make connections to the database, however the statuses n=
ever
changed from connect to anything else, and yet the amount of connections ke=
pt
on rising.



=B7 pan>         From
what I could gather, the incoming processes were trying to connect to the
database but the connections could not be released causing havoc.



=A0



I have tried to find cl=
ues in log files, etc... but nothing
turned up. I suspected that it could perhaps be php however this could not =
be
verified yet.



=A0



Can someone please prov=
ide me with some thoughts as to why
this could be happening? I am fairly new to MySQL and not sure where else t=
o go
from here to find the root cause.



=A0



Generally everything wo=
rks fine, however , every now and
then things suddenly seem to be going wrong... Wingdings;">L



=A0



=A0 Any help would be a=
ppreciated.



=A0



;;">Machiel Richards



;;">MySQL DBA



;;">Relational Database Consulting



=A0



Error! Filename not sp=
ecified.



=A0









My first guess would be a networking problem. If you=
run
ifconfig repeatedly do you notice the number of errors increasing? It would=
be
good to look at both the database server and the web server. Also, until yo=
u
figure the issue out you should be able to mitigate it by setting the conne=
ct
timeout to a more aggressive value.





--

Rob Wultsch

wultsch@gmail.com >











--
Rob Wultsch
=3D"mailto:wultsch@gmail.com">wultsch@gmail.com


--00c09fa21cb40bbd64048a639ead--
--00c09fa21cb40bbd6a048a639eae--

RE: Mysql connections not released

am 02.07.2010 10:48:48 von machielr

------=_NextPart_000_0122_01CB19D4.298B3060
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0123_01CB19D4.298B3060"


------=_NextPart_001_0123_01CB19D4.298B3060
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

We do not use that setting at present no.... specifically because all hosts
use ip's to connect and not dns / hostnames.



We can't seem to find any errors thus the reason for truggling to pinpoint
the exact cause.



Machiel Richards

MySQL DBA

Relational Database Consulting



RDC_Logo



From: Rob Wultsch [mailto:wultsch@gmail.com]
Sent: 02 July 2010 10:46 AM
To: Machiel Richards
Cc: mysql@lists.mysql.com
Subject: Re: Mysql connections not released



A bad assumption I make these days is that everyone has skip resolve off. If
that is the case DNS issues will not impact you.

Do you have that setting?
Do you see errors on the interface?

On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards wrote:

Hi



From a thread found on the net it also suggests that it might be network
or DNS related.



The connections building up is the following:



*************************** 1346. row
***************************

Id: 903175

User: unauthenticated user

Host: :51798

db: NULL

Command: Connect

Time: NULL

State: login

Info: NULL





The servers however only uses ip connections and no DNS
related lookups.



From what I could find on the web though it seems that there
is one session that is unable to authenticate and the authentication process
does not complete causing it to get "stuck"

This then causes all other requests to wait for the
transaction to complete.



Everyone who replied to these threads with the same issue
stated that when they kill that one problem connection it brings everything
back to normal again, however the problem happens regularly and if not
picked up immediately eventually causes an inability to access the database
to even kill processes, etc...





So what I know now is that the problem is caused by a
connection / transaction not completing. However what I need to find out now
is why and how to resolve this.







Machiel Richards

MySQL DBA

Relational Database Consulting



RDC_Logo



From: Rob Wultsch [mailto:wultsch@gmail.com]
Sent: 02 July 2010 9:42 AM
To: Machiel Richards
Cc: mysql@lists.mysql.com
Subject: Re: Mysql connections not released



On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards
wrote:

Good morning all



A few days ago i posted some questions relating to mysql
threads running out and not being able to restart the database.



We had the same again this morning however this time I had a
bit of a heads up and managed to get into the database before it went down
(so to speak).





What I found was the following:



.. When running ' show processlist', the amount of processes were
increasing the whole time.

.. From the details, it seemed that all the connections were coming
from the website and were trying to make connections to the database,
however the statuses never changed from connect to anything else, and yet
the amount of connections kept on rising.

.. From what I could gather, the incoming processes were trying to
connect to the database but the connections could not be released causing
havoc.



I have tried to find clues in log files, etc... but nothing turned up. I
suspected that it could perhaps be php however this could not be verified
yet.



Can someone please provide me with some thoughts as to why this could be
happening? I am fairly new to MySQL and not sure where else to go from here
to find the root cause.



Generally everything works fine, however , every now and then things
suddenly seem to be going wrong... L



Any help would be appreciated.



Machiel Richards

MySQL DBA

Relational Database Consulting



Error! Filename not specified.



My first guess would be a networking problem. If you run ifconfig repeatedly
do you notice the number of errors increasing? It would be good to look at
both the database server and the web server. Also, until you figure the
issue out you should be able to mitigate it by setting the connect timeout
to a more aggressive value.


--
Rob Wultsch
wultsch@gmail.com




--
Rob Wultsch
wultsch@gmail.com


------=_NextPart_001_0123_01CB19D4.298B3060
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:p=3D"urn:schemas-microsoft-com:office:powerpoint" =
xmlns:a=3D"urn:schemas-microsoft-com:office:access" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:s=3D"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" =
xmlns:rs=3D"urn:schemas-microsoft-com:rowset" xmlns:z=3D"#RowsetSchema" =
xmlns:b=3D"urn:schemas-microsoft-com:office:publisher" =
xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadsheet" =
xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" =
xmlns:odc=3D"urn:schemas-microsoft-com:office:odc" =
xmlns:oa=3D"urn:schemas-microsoft-com:office:activation" =
xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" =
xmlns:rtc=3D"http://microsoft.com/officenet/conferencing" =
xmlns:D=3D"DAV:" xmlns:Repl=3D"http://schemas.microsoft.com/repl/" =
xmlns:mt=3D"http://schemas.microsoft.com/sharepoint/soap/mee tings/" =
xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2003/x ml" =
xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" =
xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/oi s/" =
xmlns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/di rectory/" =
xmlns:ds=3D"http://www.w3.org/2000/09/xmldsig#" =
xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint/dsp" =
xmlns:udc=3D"http://schemas.microsoft.com/data/udc" =
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:sub=3D"http://schemas.microsoft.com/sharepoint/soap/20 02/1/alerts/"=
xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#" =
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" =
xmlns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/soap" =
xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile " =
xmlns:udcp2p=3D"http://schemas.microsoft.com/data/udc/partto part" =
xmlns:wf=3D"http://schemas.microsoft.com/sharepoint/soap/wor kflow/" =
xmlns:dsss=3D"http://schemas.microsoft.com/office/2006/digsi g-setup" =
xmlns:dssi=3D"http://schemas.microsoft.com/office/2006/digsi g" =
xmlns:mdssi=3D"http://schemas.openxmlformats.org/package/200 6/digital-sig=
nature" =
xmlns:mver=3D"http://schemas.openxmlformats.org/markup-compa tibility/2006=
" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns:mrels=3D"http://schemas.openxmlformats.org/package/200 6/relationshi=
ps" xmlns:spwp=3D"http://microsoft.com/sharepoint/webpartpages" =
xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/2006/types"=
=
xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/2006/messag=
es" =
xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/ SlideLibrary/=
" =
xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPor talServer/Pub=
lishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" =
xmlns:st=3D"" xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">










style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>We do not use that setting at present no.... specifically
because all hosts use ip’s to connect and not dns / =
hostnames.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>We can’t seem to find any errors thus the reason =
for truggling
to pinpoint the exact cause.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



Sans MS";
color:#1F497D'>Machiel Richards



Sans MS";
color:#1F497D'>MySQL DBA



Sans MS";
color:#1F497D'>Relational Database Consulting



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> src=3D"cid:image001.jpg@01CB19D4.23AC32C0" =
alt=3D"RDC_Logo">



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



0cm 0cm 0cm'>

style=3D'font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:
style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Rob Wultsch =
[mailto:wultsch@gmail.com]

Sent: 02 July 2010 10:46 AM

To: Machiel Richards

Cc: mysql@lists.mysql.com

Subject: Re: Mysql connections not released





 



A bad assumption I =
make these
days is that everyone has skip resolve off. If that is the case DNS =
issues will
not impact you.



Do you have that setting?

Do you see errors on the interface?





On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards =
< href=3D"mailto:machielr@rdc.co.za">machielr@rdc.co.za> =
wrote:







style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>Hi



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>   From a thread =
found on the
net it also suggests that it might be network or DNS =
related.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
The connections building up is the following:



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
*************************** 1346. row =
***************************



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
  
Id: 903175



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =

User: unauthenticated user



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =

Host: <ip>:51798



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
  
db: NULL



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >Command:
Connect



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =

Time: NULL



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  
State: login



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =

Info: NULL



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
The servers however only uses ip connections and no DNS related =
lookups.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
From what I could find on the web though it seems that there is one =
session
that is unable to authenticate and the authentication process does not =
complete
causing it to get “stuck”



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
This then causes all other requests to wait for the transaction to =
complete.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
Everyone who replied to these threads with the same issue stated that =
when they
kill that one problem connection it brings everything back to normal =
again,
however the problem happens regularly and if not picked up immediately
eventually causes an inability to access the database to even kill =
processes,
etc...



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'>     &n=
bsp;         
So what I know now is that the problem is caused by a connection / =
transaction
not completing. However what I need to find out now is why and how to =
resolve
this.





style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;font-family:"Comic Sans =
MS";color:#1F497D'>Machiel
Richards



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;font-family:"Comic Sans =
MS";color:#1F497D'>MySQL DBA



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;font-family:"Comic Sans =
MS";color:#1F497D'>Relational
Database Consulting



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> height=3D117
id=3D"_x0000_i1025" src=3D"cid:image001.jpg@01CB19D4.23AC32C0" =
alt=3D"RDC_Logo">



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-size:11.0pt;color:#1F497D'> 





1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>

style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > lang=3DEN-US style=3D'font-size:10.0pt'>From: lang=3DEN-US
style=3D'font-size:10.0pt'> Rob Wultsch [mailto: href=3D"mailto:wultsch@gmail.com"
target=3D"_blank">wultsch@gmail.com
]

Sent: 02 July 2010 9:42 AM

To: Machiel Richards

Cc: target=3D"_blank">mysql@lists.mysql.com

Subject: Re: Mysql connections not released





style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>







style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >On
Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards < href=3D"mailto:machielr@rdc.co.za" =
target=3D"_blank">machielr@rdc.co.za>
wrote:











style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >Good
morning all



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
A few days ago i posted some questions relating to mysql threads running =
out
and not being able to restart the database.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
We had the same again this morning however this time I had a bit of a =
heads up
and managed to get into the database before it went down (so to =
speak).



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >   =
            &=
nbsp;
What I found was the following:



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; When
running ‘ show processlist’, the amount of processes were =
increasing the whole
time.



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; From
the details, it seemed that all the connections were coming from the =
website
and were trying to make connections to the database, however the =
statuses never
changed from connect to anything else, and yet the amount of connections =
kept
on rising.



style=3D'font-family:Symbol'>· style=3D'font-size:7.0pt'>        =
; From
what I could gather, the incoming processes were trying to connect to =
the
database but the connections could not be released causing =
havoc.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>I have tried to find clues in log files, etc... but =
nothing
turned up. I suspected that it could perhaps be php however this could =
not be
verified yet.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>Can someone please provide me with some thoughts as =
to why
this could be happening? I am fairly new to MySQL and not sure where =
else to go
from here to find the root cause.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>Generally everything works fine, however , every now =
and
then things suddenly seem to be going wrong... style=3D'font-family:Wingdings'>L



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> 



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'>  Any help would be appreciated.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>Machiel =
Richards



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>MySQL DBA



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > style=3D'font-family:"Comic Sans MS"'>Relational Database Consulting =



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>





style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > lang=3DEN-US>Error! Filename not specified.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >  <=
/o:p>











style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' >My
first guess would be a networking problem. If you run ifconfig =
repeatedly do
you notice the number of errors increasing? It would be good to look at =
both
the database server and the web server. Also, until you figure the issue =
out
you should be able to mitigate it by setting the connect timeout to a =
more
aggressive value.





--

Rob Wultsch

target=3D"_blank">wultsch@gmail.com

















--

Rob Wultsch

href=3D"mailto:wultsch@gmail.com">wultsch@gmail.com









------=_NextPart_001_0123_01CB19D4.298B3060--

------=_NextPart_000_0122_01CB19D4.298B3060--

Re: Mysql connections not released

am 02.07.2010 10:58:26 von Rob Wultsch

--001636164ab56e975d048a63cbd4
Content-Type: multipart/alternative; boundary=001636164ab56e9756048a63cbd3

--001636164ab56e9756048a63cbd3
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

I do not know that part of the mysql source code well, but I am very sure
you will take the dns hit even if all of your grants are ip based.

I suggest you put put that setting into your cnf and bounce the instance.

You will also never run into issues with max connect error if you set skip
name resolve.

It might be worthwhile to start watching a continuous ping from the
webserver to the db server. Are you losing any packets?

On Fri, Jul 2, 2010 at 1:48 AM, Machiel Richards wrote=
:

> We do not use that setting at present no.... specifically because all
> hosts use ip=92s to connect and not dns / hostnames.
>
>
>
> We can=92t seem to find any errors thus the reason for truggling to pinpo=
int
> the exact cause.
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> [image: RDC_Logo]
>
>
>
> *From:* Rob Wultsch [mailto:wultsch@gmail.com]
> *Sent:* 02 July 2010 10:46 AM
>
> *To:* Machiel Richards
> *Cc:* mysql@lists.mysql.com
> *Subject:* Re: Mysql connections not released
>
>
>
> A bad assumption I make these days is that everyone has skip resolve off.
> If that is the case DNS issues will not impact you.
>
> Do you have that setting?
> Do you see errors on the interface?
>
> On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards
> wrote:
>
> Hi
>
>
>
> From a thread found on the net it also suggests that it might be netwo=
rk
> or DNS related.
>
>
>
> The connections building up is the following:
>
>
>
> *************************** 1346. row
> ***************************
>
> Id: 903175
>
> User: unauthenticated user
>
> Host: :51798
>
> db: NULL
>
> Command: Connect
>
> Time: NULL
>
> State: login
>
> Info: NULL
>
>
>
>
>
> The servers however only uses ip connections and no DNS
> related lookups.
>
>
>
> From what I could find on the web though it seems that
> there is one session that is unable to authenticate and the authenticatio=
n
> process does not complete causing it to get =93stuck=94
>
> This then causes all other requests to wait for the
> transaction to complete.
>
>
>
> Everyone who replied to these threads with the same issue
> stated that when they kill that one problem connection it brings everythi=
ng
> back to normal again, however the problem happens regularly and if not
> picked up immediately eventually causes an inability to access the databa=
se
> to even kill processes, etc...
>
>
>
>
>
> So what I know now is that the problem is caused by a
> connection / transaction not completing. However what I need to find out =
now
> is why and how to resolve this.
>
>
>
>
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> [image: RDC_Logo]
>
>
>
> *From:* Rob Wultsch [mailto:wultsch@gmail.com]
> *Sent:* 02 July 2010 9:42 AM
> *To:* Machiel Richards
> *Cc:* mysql@lists.mysql.com
> *Subject:* Re: Mysql connections not released
>
>
>
> On Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards
> wrote:
>
> Good morning all
>
>
>
> A few days ago i posted some questions relating to mysql
> threads running out and not being able to restart the database.
>
>
>
> We had the same again this morning however this time I ha=
d
> a bit of a heads up and managed to get into the database before it went d=
own
> (so to speak).
>
>
>
>
>
> What I found was the following:
>
>
>
> =B7 When running =91 show processlist=92, the amount of processes=
were
> increasing the whole time.
>
> =B7 From the details, it seemed that all the connections were com=
ing
> from the website and were trying to make connections to the database,
> however the statuses never changed from connect to anything else, and yet
> the amount of connections kept on rising.
>
> =B7 From what I could gather, the incoming processes were trying =
to
> connect to the database but the connections could not be released causing
> havoc.
>
>
>
> I have tried to find clues in log files, etc... but nothing turned up. I
> suspected that it could perhaps be php however this could not be verified
> yet.
>
>
>
> Can someone please provide me with some thoughts as to why this could be
> happening? I am fairly new to MySQL and not sure where else to go from he=
re
> to find the root cause.
>
>
>
> Generally everything works fine, however , every now and then things
> suddenly seem to be going wrong... L
>
>
>
> Any help would be appreciated.
>
>
>
> Machiel Richards
>
> MySQL DBA
>
> Relational Database Consulting
>
>
>
> *Error! Filename not specified.*
>
>
>
> My first guess would be a networking problem. If you run ifconfig
> repeatedly do you notice the number of errors increasing? It would be goo=
d
> to look at both the database server and the web server. Also, until you
> figure the issue out you should be able to mitigate it by setting the
> connect timeout to a more aggressive value.
>
>
> --
> Rob Wultsch
> wultsch@gmail.com
>
>
>
>
> --
> Rob Wultsch
> wultsch@gmail.com
>



--=20
Rob Wultsch
wultsch@gmail.com

--001636164ab56e9756048a63cbd3
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

I do not know that part of the mysql source code well, but I am very sure y=
ou will take the dns hit even if all of your grants are ip based.

I =
suggest you put put that setting into your cnf and bounce the instance.



You will also never run into issues with max connect error if you set s=
kip name resolve.

It might be worthwhile to start watching a continu=
ous ping from the webserver to the db server. Are you losing any packets? r>


On Fri, Jul 2, 2010 at 1:48 AM, Machiel Rich=
ards <machielr@r=
dc.co.za
>
wrote:
=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); p=
adding-left: 1ex;">















25);">We do not use that setting at present no.... specifically
because all hosts use ip=92s to connect and not dns / hostnames.



25);">=A0



25);">We can=92t seem to find any errors thus the reason for truggling
to pinpoint the exact cause.



25);">=A0



omic Sans MS"; color: rgb(31, 73, 125);">Machiel Richards



omic Sans MS"; color: rgb(31, 73, 125);">MySQL DBA



omic Sans MS"; color: rgb(31, 73, 125);">Relational Database Consultin=
g



25);">=A0



25);">3D"RDC_Logo" h=3D"323" height=3D"117">



25);">=A0



ne none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text=
-color; padding: 3pt 0cm 0cm;">

F=
rom:
Rob Wultsch=
[mailto:wultsch@gma=
il.com
]



Sent: 02 July 2010 10:46 AM



To: Machiel Richards

Cc: mysql=
@lists.mysql.com


Subject: Re: Mysql connections not released





=A0



A bad assumption I ma=
ke these
days is that everyone has skip resolve off. If that is the case DNS issues =
will
not impact you.



Do you have that setting?

Do you see errors on the interface?





On Fri, Jul 2, 2010 at 1:05 AM, Machiel Richards <=
;machielr@rdc.co.za=
> wrote:







25);">Hi



25);">=A0



25);">   From a thread found on the
net it also suggests that it might be network or DNS related.



25);">=A0



25);">              =A0
The connections building up is the following:



25);">=A0



25);">              =A0
*************************** 1346. row *************************** >

    
Id: 903175



  
User: unauthenticated user



  
Host: <ip>:51798



    
db: NULL



Command:
Connect



  
Time: NULL



=A0
State: login



  
Info: NULL



25);">=A0



25);">=A0



25);">              =A0
The servers however only uses ip connections and no DNS related lookups. pan>



25);">=A0



25);">              =A0
From what I could find on the web though it seems that there is one session
that is unable to authenticate and the authentication process does not comp=
lete
causing it to get =93stuck=94



25);">              =A0
This then causes all other requests to wait for the transaction to complete=
..



25);">=A0



25);">              =A0
Everyone who replied to these threads with the same issue stated that when =
they
kill that one problem connection it brings everything back to normal again,
however the problem happens regularly and if not picked up immediately
eventually causes an inability to access the database to even kill processe=
s,
etc...



25);">=A0



25);">              =A0



25);">              =A0
So what I know now is that the problem is caused by a connection / transact=
ion
not completing. However what I need to find out now is why and how to resol=
ve
this.





25);">=A0



25);">=A0



25);">=A0



omic Sans MS"; color: rgb(31, 73, 125);">Machiel
Richards



omic Sans MS"; color: rgb(31, 73, 125);">MySQL DBA



omic Sans MS"; color: rgb(31, 73, 125);">Relational
Database Consulting



25);">=A0



25);">3D"RDC_Logo" er=3D"0" width=3D"323" height=3D"117">



25);">=A0





e; padding: 3pt 0cm 0cm; border-color: -moz-use-text-color;">

F=
rom:
Rob Wultsch=
[mailto:wultsch@gma=
il.com
]



Sent: 02 July 2010 9:42 AM

To: Machiel Richards

Cc: mysql=
@lists.mysql.com


Subject: Re: Mysql connections not released





=A0







On
Thu, Jul 1, 2010 at 11:58 PM, Machiel Richards < lr@rdc.co.za" target=3D"_blank">machielr@rdc.co.za>
wrote:











Good
morning all



=A0



              =A0
A few days ago i posted some questions relating to mysql threads running ou=
t
and not being able to restart the database.



=A0



              =A0
We had the same again this morning however this time I had a bit of a heads=
up
and managed to get into the database before it went down (so to speak).



=A0



=A0



              =A0
What I found was the following:



=A0



=B7 pan>         When
running =91 show processlist=92, the amount of processes were increasing th=
e whole
time.



=B7 pan>         From
the details, it seemed that all the connections were coming from the websit=
e
and were trying to make connections to the database, however the statuses n=
ever
changed from connect to anything else, and yet the amount of connections ke=
pt
on rising.



=B7 pan>         From
what I could gather, the incoming processes were trying to connect to the
database but the connections could not be released causing havoc.



=A0



I have tried to find cl=
ues in log files, etc... but nothing
turned up. I suspected that it could perhaps be php however this could not =
be
verified yet.



=A0



Can someone please prov=
ide me with some thoughts as to why
this could be happening? I am fairly new to MySQL and not sure where else t=
o go
from here to find the root cause.



=A0



Generally everything wo=
rks fine, however , every now and
then things suddenly seem to be going wrong... Wingdings;">L



=A0



=A0 Any help would be a=
ppreciated.



=A0



;;">Machiel Richards



;;">MySQL DBA



;;">Relational Database Consulting



=A0





Error! Filename not specifie=
d.



=A0











My
first guess would be a networking problem. If you run ifconfig repeatedly d=
o
you notice the number of errors increasing? It would be good to look at bot=
h
the database server and the web server. Also, until you figure the issue ou=
t
you should be able to mitigate it by setting the connect timeout to a more
aggressive value.





--

Rob Wultsch

wultsch@gmail.com >

















--

Rob Wultsch

wultsch@gmail.com >











--
Rob Wultsch
=3D"mailto:wultsch@gmail.com">wultsch@gmail.com


--001636164ab56e9756048a63cbd3--
--001636164ab56e975d048a63cbd4--